package com.hyst.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.hyst.model.UserModel;


@Repository
public interface UserRepository extends JpaRepository<UserModel, String> {

	//UserModel findOneByUsername(String username);
	
	List<UserModel> findAll();

	// @Transactional(timeout = 10)
	// @Query(value="select * from `user` where secretlevel= ?1", nativeQuery = true)
	// List<UserModel> getUsers(String secretlevel);
	
	UserModel findOneById(String id);
}
